clear all; 
cucd=cd; 
%loadStru.path='O:\PROJ_LIB\LJM\exog\CEFJ\Big\PriorKappa Norm2 levH Prior5\01 20 12';
%loadStru.fileName='twoModesForTable'; 
%outputPath='Two Modes';
loadStru.path='O:\PROJ_LIB\LJM\exog\Forward Guidance\March 1 2012'; 
loadStru.fileName='modeCEFJBigARMA';
outputPath='Mode';

loadStru.sheetName='Short'; 
add2FunctionHandle=[]; 
flagConvertCell=1; 
NAddToColOne=1; 
cd(loadStru.path);
if exist('sheetName','var')==0 || isempty(loadStru.sheetName)
    [parmodes,cellAll]=xlsread(loadStru.fileName);
else
    [parmodes,cellAll]=xlsread(loadStru.fileName,loadStru.sheetName);
end
cd(cucd);
%printcell([parnames(:) num2cprec(parmodes)]);  

%% =========================================================================
outputPath=cr_dir(loadStru.path,outputPath); 
tableStru.rowLabels=convert2tex(cellAll(3:end,1)); 
tableStru.corner=cellAll(2,1); 
tableStru.tableHeader=cellAll(1,1); 
    tableStru.colLabels=cellAll(2,2:end);

if flagConvertCell==0;
    tableStru.dataMat=parmodes;
else
    cellMat=[cellAll(3:end,2:(2+NAddToColOne-1)) num2cprec(parmodes,3) ];
    tableStru.dataMat=cellMat;
end
latexStru.printPDF=true;
latexStru.fileName=loadStru.fileName;
latexStru.outPath=outputPath;
latexStru.fileExists=false;
latexStru.maxCols=9;
latexStru.maxRows=30;
latexStru.orientation='portrait';
multiPageTable(tableStru,latexStru);
fclose('all'); 

